package com.ruoyi.web.controller.tool;

import com.ruoyi.web.otherService.LoginServerService;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.core.controller.BaseController;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * swagger 接口
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/tool/swagger")
public class SwaggerController extends BaseController
{
    @Autowired
    LoginServerService loginServerService;
    @RequiresPermissions("tool:swagger:view")
    @GetMapping()
    public String index()
    {
        return redirect("/swagger-ui/index.html");
    }

    @RequiresPermissions("tool:swagger:loginServer")
    @GetMapping("/loginServer")
    public String toLoginServer(){
        return redirect("http://localhost:1001/loginServer/swagger-ui.html");
    }

    @RequiresPermissions("tool:swagger:imgServer")
    @GetMapping("/imgServer")
    public String toImgServer(){
        return redirect("http://localhost:10020/swagger-ui.html");
    }
}
